<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<html xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<link th:href="@{/css/shop.css}" type="text/css" rel="stylesheet" />
<link th:href="@{/css/bkg_ui.css}" type="text/css"  rel="stylesheet" /><!--基本页面样式-->
<link th:href="@{/font/css/font-awesome.min.css}"  rel="stylesheet" type="text/css" /><!--图标样式-->
<link th:href="@{/layui/css/layui.css}" rel="stylesheet" type="text/css" />
<link th:href="@{/css/BackgroudCss/cityManage.css}" rel="stylesheet" type="text/css"/>
<!--<link th:href="@{/css/Sellerber.css}" type="text/css"  rel="stylesheet" />-->

<script th:src="@{/js/jquery-1.9.1.min.js}" type="text/javascript" ></script>
<script th:src="@{/layui/layui.js}" type="text/javascript"></script>
<script th:src="@{/js/shopFrame.js}" type="text/javascript"></script>
<script th:src="@{/js/Sellerber.js}" type="text/javascript"></script>
<script th:src="@{/js/layer/layer.js}" type="text/javascript"></script>
<script th:src="@{/js/Backgroundjs/cityManage.js}" type="text/javascript"></script>
<!--<script th:src="@{/js/Validform/Validform.min.js}" type="text/javascript"></script>-->
<title>城市列表</title>
</head>
<!--[if lt IE 9]>
  <script th:src="@{/js/html5shiv.js}"></script>
  <script th:src="@{/js/respond.min.js}"></script>
  <script th:src="@{/js/css3-mediaqueries.js}"  type="text/javascript"></script>
  <![endif]-->
<body>
<!--左侧导航栏-->
<div class="layui-nav-tree layui-nav-side">
	<ul class="layui-nav layui-nav-tree layui-nav-side">
        <li class="layui-nav-item provinceShow" th:each="pro :${provinces}">
            <a th:text="${pro.getCityName()}" href="javascript:;"></a><i th:text="${pro.getCityAbbrCode()}" class='hideSpan'></i>
            <span th:text="${pro.getCityId()}" class='hideSpan'></span>
        </li>
	</ul>
</div>
<!--按钮-->
<div class="margin Competence_style" id="page_style">
	<div class="operation clearfix">
        <a href="javascript:void(0)" id="back" class="btn button_btn bg-deep-blue"><i class="fa fa-arrow-left" aria-hidden="true"></i></a>
		<a href="javascript:void(0)" id="city_add" shiro:hasPermission="user:addCity" class="btn button_btn bg-deep-blue"><i class="fa fa-edit"></i>&nbsp;添加城市/区县</a>
        <a href="javascript:void(0)" id="forward" class="btn button_btn bg-deep-blue"><i class="fa fa-arrow-right" aria-hidden="true"></i></a>
	</div>
</div>
<!--主体部分-->
<div class="compete_list">
    <table id="sample_table" class="table table_list table_striped table-bordered dataTable no-footer">
        <thead>
        <tr id="tr">
            <th>城市ID</th>
            <th>城市名称</th>
            <th>城市全拼</th>
            <th>城市首拼</th>
            <th>父级ID</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody id="tbody">
        <tr th:each="city :${page}">
            <td th:text="${city.cityId}"></td>
            <td th:text="${city.cityName}"></td>
            <td th:text="${city.cityEnName}"></td>
            <td th:text="${city.cityAbbrCode}"></td>
            <td th:text="${city.fatherId}"></td>
            <td>
                <a th:onclick="|update(${city.cityId},${city.fatherId})|" title='编辑' href='javascript:;' shiro:hasPermission="user:updateCity" class='btn btn-xs btn-status'> 编辑 </a>&emsp;
                <a th:onclick="'javascript:del('+${city.cityId}+','+${city.fatherId}+')'" id='del' href='javascript:;' shiro:hasPermission="user:deleteCity" title='删除'  class='btn btn-xs btn-danger'> 删除 </a>
            </td>
        </tr>
        </tbody>
		</table>

        <span class="hideSpan" id="totalElements" th:text="${page.totalElements}"></span>
        <span class="hideSpan" id="number" th:text="${page.number}"></span>
        <span class="hideSpan" id="pageSize" th:text="${page.size}"></span>
        <!--分页-->
		<div id="page"></div>
</div>

 <!--添加城市-->
 <div id="add" class=" add_administrator" style="display:none">
   <div class="add_style add_administrator_style">
    <form method="post" id="form-city-add">
    <ul>
     <li class="clearfix">
     <label class="label_name col-xs-2 col-lg-2"><i>*</i>城市名称：</label>
     <div class="formControls col-xs-6">
     <input type="text" class="input-text col-xs-12" value="" placeholder="" name="cityName" datatype="*2-16" nullmsg="城市名称不能为空"></div>
    <div class="col-4"> <span class="Validform_checktip"></span></div>
     </li>

     <li class="clearfix">
     <label class="label_name col-xs-2 col-lg-2"><i class="c-red">*</i>城市全拼：</label>
	 <div class="formControls col-xs-6">
	 <input type="text" placeholder="beijing" name="cityEnName" autocomplete="off" value="" class="input-text col-xs-12" datatype="*" nullmsg="城市全拼不能为空">
	</div>
     <div class="col-4"> <span class="Validform_checktip"></span></div>
     </li>

     <li class="clearfix">
      <label class="label_name col-xs-2 col-lg-2"><i class="c-red">*</i>城市首拼：</label>
      <div class="formControls col-xs-6">
	 	<input type="text" placeholder="bj" name="cityAbbrCode" autocomplete="off" value="" class="input-text col-xs-12" datatype="*" nullmsg="城市首拼不能为空">
	  </div>
	  <div class="col-4"> <span class="Validform_checktip"></span></div>
     </li>

     <li class="clearfix">
      <label class="label_name col-xs-2 col-lg-2"><i class="c-red">*</i>所属省份：</label>
      <div class="formControls col-xs-6"> <span class="select-box" style="width:150px;">
		  <select class="select" class="chooseProvince_add" name="fatherId" size="1">
			  <option value="5">河南</option>
			  <option value="6">安徽</option>
			  <option value="7">福建</option>
		  </select>
	  	 </span>
	  </div>

     </li>
	 <li class="clearfix">
		<label class="label_name col-xs-2 col-lg-2">所属城市：</label>
		<div class="formControls col-xs-6">
		  <span class="select-box" style="width:150px;">
		  	<select class="select" class="chooseCity_add" name="more1" size="1">
			  <option value="5">河南</option>
			  <option value="6">安徽</option>
			  <option value="7">福建</option>
		  	</select>
	  	  </span>
		</div>
	 </li>
     <li class="clearfix col-xs-12 col-lg-12 align">	
	  	<input class="btn button_btn bg-deep-blue btn_height" type="button" id="subAdd" value="提交添加">
      	<input name="reset" type="reset" class="btn button_btn btn-infobtn-gray btn_height" value="取消重置" />
	</li>
    </ul>
    </form>
	 </div>
   </div>

<!--修改城市-->
 <div id="update" class=" add_administrator" style="display:none">
    <div class="add_style add_administrator_style">
        <form method="post" id="form-city-update">
            <ul>
                <li class="clearfix">
                    <label class="label_name col-xs-2 col-lg-2"><i>*</i>城市名称：</label>
                    <div class="formControls col-xs-6">
                        <input type="text" class="hideSpan" value="" name="cityId"/>
                        <input type="text" class="input-text col-xs-12" value="" placeholder="" name="cityName" datatype="*2-16" nullmsg="城市名称不能为空"></div>
                    <div class="col-4"> <span class="Validform_checktip"></span></div>
                </li>

                <li class="clearfix">
                    <label class="label_name col-xs-2 col-lg-2"><i class="c-red">*</i>城市全拼：</label>
                    <div class="formControls col-xs-6">
                        <input type="text" placeholder="beijing" name="cityEnName" autocomplete="off" value="" class="input-text col-xs-12" datatype="*" nullmsg="城市全拼不能为空">
                    </div>
                    <div class="col-4"> <span class="Validform_checktip"></span></div>
                </li>

                <li class="clearfix">
                    <label class="label_name col-xs-2 col-lg-2"><i class="c-red">*</i>城市首拼：</label>
                    <div class="formControls col-xs-6">
                        <input type="text" placeholder="bj" name="cityAbbrCode" autocomplete="off" value="" class="input-text col-xs-12" datatype="*" nullmsg="城市首拼不能为空">
                    </div>
                    <div class="col-4"> <span class="Validform_checktip"></span></div>
                </li>

                <li class="clearfix">
                    <label class="label_name col-xs-2 col-lg-2"><i class="c-red">*</i>所属省份：</label>
                    <div class="formControls col-xs-6"> <span class="select-box" style="width:150px;">
		  <select class="select" class="chooseProvince_update" name="fatherId" size="1">
			  <option value="5">河南</option>
			  <option value="6">安徽</option>
			  <option value="7">福建</option>
		  </select>
	  	 </span>
                    </div>

                </li>
                <li class="clearfix">
                    <label class="label_name col-xs-2 col-lg-2">所属城市：</label>
                    <div class="formControls col-xs-6">
		  <span class="select-box" style="width:150px;">
		  	<select class="select" class="chooseCity_update" name="more1" size="1">
			  <option value="5">河南</option>
			  <option value="6">安徽</option>
			  <option value="7">福建</option>
		  	</select>
	  	  </span>
                    </div>
                </li>
                <li class="clearfix col-xs-12 col-lg-12 align">
                    <input class="btn button_btn bg-deep-blue btn_height" type="button" id="subUpdate" value="提交修改">
                    <input name="reset" type="reset" class="btn button_btn btn-infobtn-gray btn_height" value="取消重置" />
                </li>
            </ul>
        </form>
    </div>
</div>
</body>
</html>


